@import "colors";

.wg-cards {
  .cards {
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    flex-wrap: wrap;

    .overlay {
      top: -1rem;
      left: -1rem;
      right: -1rem;
      bottom: -1rem;
      width: calc(100% + 2rem);
      max-width: calc(100% + 2rem);
      background-color: rgba(255,255,255,0);
      -webkit-transition: background-color ease-in-out 1s;
      transition: background-color ease-in-out 1s;
      &.active {
        height: 100%;
        z-index: 100;
        background-color: rgba(255,255,255,0.8);
      }
    }

    .banner {
      position: absolute;
      left: 2px;
      top: 1.5rem;
      padding: 7px 20px 7px 29px;
      background-color: #dad7df;
      border-top-left-radius: 2px;
      border-top-right-radius: 4px;
      border-bottom-right-radius: 4px;
      box-shadow: 3px 3px 2px rgba(0, 0, 0, 0.2);
      text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.3);
      z-index: 1;

      &::before {
        content: "";
        position: absolute;
        left: 0;
        bottom: -13px;
        border: 7px solid #9f9ba6;
        border-left-color: transparent !important;
        border-bottom-color: transparent !important;
      }

      &.mosaic-orange {
        background-color: $mosaic-orange;
        color: #fff;
        text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);

        &::before {
          border-color: darken($mosaic-orange, 15%);
        }
      }

      &.mosaic-blue {
        background-color: $mosaic-blue;
        color: #fff;
        text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);

        &::before {
          border-color: darken($mosaic-blue, 15%);
        }
      }

      &.mosaic-purple {
        background-color: $mosaic-purple;
        color: #fff;
        text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);

        &::before {
          border-color: darken($mosaic-purple, 10%);
        }
      }

      &.mosaic-green {
        background-color: $mosaic-green;
        color: #fff;
        text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.4);

        &::before {
          border-color: darken($mosaic-green, 15%);
        }
      }

      .subtitle {
        display: block;
        font-size: 0.6rem;
        font-style: italic;
      }

      .title {
        display: block;
        font-size: 0.7rem;
        font-weight: bold;

        &:not(.no-subtitle) {
          margin-top: -0.2rem;
        }
      }
    }

    .card-wrap.blurred {
      filter: blur(2px);
      -webkit-filter: blur(2px);
    }

    .card {
      height: 100%;
      display: flex;
      flex-direction: column;
      position: relative;

      .image {
        img {
          height: auto;
          max-height: 100%;
          transform: scale(1);
          transition: transform ease-in-out 0.2s;
          border-radius: 4px;
        }
        a {
          width: 100%;
          height: 100%;
          img {
            max-width: 100%;
            max-height: 100%;
            &:hover {
              transform: scale(1.06);
            }
          }
        }
      }

      h4 {
        text-transform: none;
      }

      .text {
        font-size: 0.8rem;
      }

      .open-hidden-content {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
      }

      .button {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        width: calc(100% + var(--bs-gutter-x));
        margin: 0 calc(var(--bs-gutter-x) / -2);
        max-width: calc(100% + var(--bs-gutter-x));
        a {
          display: block;
          margin: 0;
          border-radius: 0;
          padding: 0.6rem 1.5rem;
        }
      }
    }

    .hidden-content {
      display: none;
      height: auto;
      z-index: 100;
      opacity: 0;
      transform: scale(0.7);
      box-shadow: 0 1.3em 1.4rem 1rem rgba(24, 21, 30, 0.17), inset 0 0 1px #aaa !important;
      -webkit-transition: all ease-in-out 0.6s;
      transition: all ease-in-out 0.6s;

      &.visible {
        transform: scale(1);
        display: block;
        opacity: 1;
      }

      .close {
        z-index: 1;
        a i {
          color: $mosaic-navy;
        }
      }

      .text {
        h3 {
          font-size: 1.1rem;
        }
        p {
          font-size: 0.8rem;
        }
      }
    }
  }
}
